"""
计算结果数据模型
"""
from typing import Dict, List, Any, Optional
from pydantic import BaseModel, Field


class CalculationResult(BaseModel):
    """
    计算结果数据模型
    """
    id: str
    scene_id: str
    start_time: str
    end_time: str
    execution_time: float  # 执行时间（秒）
    status: str  # success, error
    result_data: Dict[str, Any] = Field(default_factory=dict)
    error: Optional[str] = None
    
    class Config:
        arbitrary_types_allowed = True